// Copyright 2019 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.

import * as React from "react";

export interface IconProps {
  fill?: string;
  color?: string;
  height?: number;
}

CockroachLabsLockupIcon.defaultProps = {
  height: 49,
};

export function CockroachLabsLockupIcon(props: IconProps) {
  const { height } = props;
  const widthViewBox = 217;
  const heightViewBox = 36;
  const width = (height / heightViewBox) * widthViewBox;

  return (
    <svg
      width={width}
      height={height}
      viewBox="0 0 217 36"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
      xmlnsXlink="http://www.w3.org/1999/xlink"
    >
      <g clipPath="url(#clip0)">
        <mask
          id="mask0"
          mask-type="alpha"
          maskUnits="userSpaceOnUse"
          x="0"
          y="0"
          width="29"
          height="36"
        >
          <path
            d="M22.4551 23.9678C23.3385 20.3906 23.1869 16.6333 22.0183 13.1402C20.8496 9.647 18.7129 6.56394 15.8605 4.25534C18.4651 2.74631 21.4183 1.95505 24.4229 1.9612C25.562 1.96058 26.6984 2.07313 27.8157 2.29723L28.2857 0.394102C27.0145 0.132112 25.7204 8.7917e-05 24.4229 3.57098e-05C20.7812 -0.00704256 17.2141 1.03829 14.1444 3.01204C11.0744 1.0386 7.50735 -0.00670023 3.86582 3.57098e-05C2.56733 9.03323e-05 1.27217 0.132114 0 0.394102L0.469962 2.29723C1.58819 2.07297 2.72565 1.96042 3.86582 1.9612C6.87098 1.95488 9.8249 2.74501 12.4312 4.25229C10.1003 6.13861 8.23989 8.54833 6.99879 11.2888C5.7577 14.0292 5.17038 17.0242 5.28383 20.0343C5.39728 23.0443 6.20833 25.9858 7.65213 28.6235C9.09589 31.2612 11.1323 33.5219 13.5986 35.2247L14.1504 35.6065L14.6992 35.2247C18.5638 32.553 21.3246 28.549 22.4611 23.9678H22.4551ZM13.1711 32.4234C10.6313 30.2135 8.78818 27.3037 7.86863 24.0521C6.94906 20.8006 6.99313 17.349 7.99542 14.1223C8.97772 15.7667 10.1967 17.2554 11.6126 18.5395C12.1039 18.9856 12.4966 19.5308 12.765 20.1397C13.0335 20.7486 13.1719 21.4075 13.1711 22.0739V32.4234ZM14.1444 18.0965C12.8395 17.1214 11.6779 15.9655 10.6939 14.663C10.0639 13.8287 9.72277 12.8092 9.72277 11.761C9.72277 10.7126 10.0639 9.69321 10.6939 8.85885C11.677 7.54563 12.8409 6.38024 14.1504 5.39782C15.4745 6.39344 16.6497 7.57549 17.6403 8.90774C18.2497 9.72821 18.579 10.7255 18.579 11.7502C18.579 12.775 18.2497 13.7723 17.6403 14.5927C16.6459 15.922 15.4688 17.1017 14.1444 18.0965ZM15.1146 32.4234V22.0739C15.1142 21.4074 15.253 20.7481 15.522 20.1392C15.791 19.5303 16.1842 18.9852 16.6761 18.5395C18.0917 17.256 19.3098 15.7672 20.2902 14.1223C20.8129 15.8029 21.0777 17.5542 21.0755 19.3154C21.0729 21.8031 20.5392 24.2612 19.5107 26.5229C18.4822 28.7846 16.983 30.7969 15.1146 32.4234Z"
            fill="black"
          />
        </mask>
        <g mask="url(#mask0)">
          <path d="M28.501 0H0V35.7409H28.501V0Z" fill="url(#pattern0)" />
        </g>
        <path
          d="M71.1024 20.3184C71.1024 25.2516 67.927 28.6462 63.3782 28.6462C58.8292 28.6462 55.6215 25.2516 55.6215 20.3184C55.6215 15.3854 58.8009 11.9907 63.3782 11.9907C67.9553 11.9907 71.1024 15.3854 71.1024 20.3184ZM58.4212 20.3184C58.4212 23.8758 60.3603 26.3384 63.3782 26.3384C66.3959 26.3384 68.3068 23.8962 68.3068 20.3184C68.3068 16.7407 66.4 14.2986 63.3782 14.2986C60.3562 14.2986 58.4373 16.7652 58.4373 20.3184H58.4212Z"
          fill="#190F33"
        />
        <path
          d="M113.033 15.0596C112.362 14.8522 111.666 14.7412 110.964 14.7299C108.864 14.7299 107.308 16.5575 107.308 19.7567V28.1985H104.573V12.4384H107.15V14.8114C107.882 13.2729 109.17 12.182 111.029 12.182C111.723 12.1509 112.415 12.2834 113.049 12.5687L113.033 15.0596Z"
          fill="#190F33"
        />
        <path
          d="M129.403 20.3184C129.403 25.2516 126.223 28.6462 121.678 28.6462C117.134 28.6462 113.925 25.2353 113.925 20.3184C113.925 15.4016 117.105 11.9907 121.682 11.9907C126.259 11.9907 129.403 15.3854 129.403 20.3184ZM116.721 20.3184C116.721 23.8758 118.66 26.3384 121.678 26.3384C124.696 26.3384 126.607 23.8962 126.607 20.3184C126.607 16.7407 124.7 14.2986 121.678 14.2986C118.656 14.2986 116.721 16.7652 116.721 20.3184Z"
          fill="#190F33"
        />
        <path
          d="M138.852 11.9907C136.472 11.9907 134.384 12.9513 132.522 14.3596V17.2088C133.802 16.1628 136.206 14.2619 138.949 14.2619C139.467 14.2317 139.985 14.3049 140.475 14.4775C140.964 14.65 141.415 14.9184 141.801 15.2673C142.037 15.5 142.226 15.7763 142.359 16.0813C142.459 16.3187 142.506 16.5759 142.494 16.8336C142.482 17.0915 142.413 17.3433 142.291 17.5706C142.17 17.7978 142 17.9945 141.792 18.1461C141.585 18.2977 141.346 18.4002 141.094 18.4462L139.11 18.8084C135.2 19.5125 131.839 20.6033 131.839 24.287C131.839 27.4251 134.384 28.7073 137.434 28.7073C139.785 28.7073 141.692 27.8403 142.742 26.2407V28.1944H145.223V17.2455C145.21 14.1683 142.985 11.9907 138.852 11.9907ZM142.609 20.0865V22.3047C142.609 24.8975 140.412 26.4564 137.708 26.4564C135.688 26.4564 134.497 25.6423 134.497 24.2137C134.487 23.902 134.54 23.5916 134.654 23.3017C134.768 23.0117 134.94 22.7486 135.159 22.5286C136.719 20.9371 141.317 20.9656 142.609 20.0865Z"
          fill="#190F33"
        />
        <path
          d="M176.487 17.4041V28.1985H173.757V18.2712C173.757 15.6743 172.485 14.3311 170.165 14.3311C169.63 14.3245 169.1 14.4262 168.605 14.6301C168.109 14.8342 167.661 15.1363 167.283 15.5186C166.907 15.9009 166.61 16.3556 166.411 16.8558C166.212 17.3558 166.115 17.8912 166.125 18.4299V28.1985H163.395V7.32623H166.125V14.2457C167.175 12.7722 168.892 12.003 170.897 12.003C174.677 11.9908 176.487 14.4573 176.487 17.4041Z"
          fill="#190F33"
        />
        <path
          d="M85.1695 24.7673C85.1695 24.7673 83.2549 26.1268 81.0931 26.1268C76.9967 26.1268 76.2978 21.8286 76.2978 20.2779C76.2978 19.4272 76.5805 14.4695 81.2062 14.4695C82.5866 14.5106 83.9405 14.8609 85.1695 15.4953V13.0246C83.9189 12.3255 82.5115 11.9585 81.081 11.9583C76.2574 11.9583 73.4819 15.9186 73.4819 20.1557C73.4819 27.5269 78.948 28.6544 80.9518 28.6544C82.432 28.6707 83.8889 28.2839 85.1695 27.535V24.7673Z"
          fill="#190F33"
        />
        <path
          d="M159.981 24.7673C159.981 24.7673 158.07 26.1268 155.904 26.1268C151.808 26.1268 151.109 21.8286 151.109 20.2779C151.109 19.4272 151.396 14.4695 156.021 14.4695C157.401 14.5112 158.753 14.8615 159.981 15.4953V13.0246C158.73 12.325 157.323 11.958 155.893 11.9583C151.073 11.9583 148.293 15.9186 148.293 20.1557C148.293 27.5269 153.763 28.6544 155.763 28.6544C157.245 28.6645 158.702 28.2707 159.981 27.5147V24.7673Z"
          fill="#190F33"
        />
        <path
          d="M99.3815 28.1985H102.432L96.1499 18.7229C97.7238 16.8183 99.0267 14.7017 100.021 12.4344H97.0424C95.6405 15.2452 93.7035 17.7512 91.3427 19.8097V7.32623H88.6072V28.1985H91.3427V23.2694C92.4271 22.4716 93.4509 21.5926 94.4049 20.64L99.3815 28.1985Z"
          fill="#190F33"
        />
        <path
          d="M46.5883 25.9761C39.5912 25.9761 39.6841 18.5968 39.6841 17.7461C39.6841 9.88243 45.5864 9.65856 46.8307 9.65856C49.2546 9.65856 51.2302 10.5662 53.04 12.1495V8.95438C51.2347 7.63391 49.0616 6.92165 46.8307 6.91925C43.1058 6.91925 36.8036 9.2027 36.8036 17.7705C36.8188 20.0014 37.3853 22.1935 38.4519 24.1486C40.1487 27.1036 42.9645 28.6625 46.5883 28.6625C49.493 28.6625 51.2463 27.7019 53.0521 26.3791V23.1636C50.6968 24.9992 49.4405 25.9761 46.5883 25.9761Z"
          fill="#190F33"
        />
        <path
          d="M188.418 7.32623H180.645V28.1985H188.418C194.073 28.1985 197.601 24.1974 197.601 17.7542C197.601 11.311 194.081 7.32623 188.418 7.32623ZM194.639 17.7745C194.639 22.8298 192.215 25.7279 187.981 25.7279H183.537V9.79685H187.981C192.15 9.79685 194.639 12.7722 194.639 17.7542V17.7745Z"
          fill="#190F33"
        />
        <path
          d="M213.259 17.1599C214.15 16.8123 214.912 16.1952 215.441 15.3935C215.97 14.5919 216.239 13.6448 216.212 12.6827C216.212 9.36133 213.865 7.32623 210.075 7.32623H200.929V28.1985H210.516C214.414 28.1985 216.931 25.8784 216.931 22.2884C216.943 19.8382 215.598 17.9862 213.259 17.1599ZM214.026 22.1419C214.026 24.462 212.443 25.8051 209.68 25.8051H203.834V18.4787H209.671C212.362 18.4584 214.026 19.8707 214.026 22.1419ZM203.834 16.0569V9.71137H209.567C212.015 9.71137 213.364 10.8145 213.364 12.8129C213.364 14.8114 211.971 16.0691 209.534 16.0691L203.834 16.0569Z"
          fill="#190F33"
        />
      </g>
      <defs>
        <pattern
          id="pattern0"
          patternContentUnits="objectBoundingBox"
          width="1"
          height="1"
        >
          <use
            xlinkHref="#image0"
            transform="translate(0 -0.00155625) scale(0.00115607 0.000928808)"
          />
        </pattern>
        <clipPath id="clip0">
          <rect width="216.857" height="36" fill="white" />
        </clipPath>
        <image
          id="image0"
          width="865"
          height="1080"
          xlinkHref=""
        />
      </defs>
    </svg>
  );
}
